local skel = fk.CreateSkill {
  name = "lb__zhuji",
}

Fk:loadTranslationTable {
  ["lb__zhuji"] = "逐击",
  [":lb__zhuji"] = "每回合限一次，当一名角色不于出牌阶段内造成伤害后，你可以弃置受伤角色的一张牌。",

  ["#lb__zhuji"] = "逐击：你可以弃置 %src 一张牌",
  ["#lb__zhuji-dis"] = "逐击：弃置 %src 一张牌",

  ["$lb__zhuji1"] = "逃不掉的！",
  ["$lb__zhuji2"] = "燃尽吧。",
}

skel:addEffect(fk.Damage, {
  anim_type = "control",
  can_trigger = function(self, event, target, player, data)
    return player:hasSkill(skel.name) and target and target.phase ~= Player.Play and
        player:usedSkillTimes(skel.name) == 0 and not data.to:isNude()
  end,
  on_cost = function(self, event, target, player, data)
    return player.room:askToSkillInvoke(player, {
      skill_name = skel.name,
      prompt = "#lb__zhuji:" .. data.to.id,
    })
  end,
  on_use = function(self, event, target, player, data)
    local room = player.room
    local c = room:askToChooseCard(player, {
      target = data.to,
      flag = "he",
      skill_name = skel.name,
      prompt = "#lb__zhuji:" .. data.to.id,
    })
    if c ~= nil then
      room:throwCard(c, skel.name, data.to, player)
    end
  end,
})

return skel
